package com.ruoyi.project.cms.controller.api;

import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.cms.service.IWxSubscribeMsgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 订阅消息
 */
@Api(value = "订阅消息相关接口",tags = "订阅消息相关接口")
@RestController
@RequestMapping("/api/cms/wxmsg")
public class WxSubscribeMsgApiController {
    @Autowired
    private IWxSubscribeMsgService wxSubscribeMsgService;

    /**
     * 获取订阅模拟集合
     */
    @ApiOperation("获取订阅模版ID集合")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type",value = "1 会员 2 司机 3 中间商 4 检测站",required = true,paramType = "query")
    })
    @GetMapping("")
    public AjaxResult selectList(Integer type){
        return AjaxResult.success(wxSubscribeMsgService.selectByType(type));
    }
}
